<?php

namespace PRokkoMVC {
   /***********************************************************
    * 
    ***********************************************************/
   abstract class PRokkoModel {
      protected $wpdb;
      
      /***********************************************************
       * Constructor only used for this dependency injection
       ***********************************************************/
      public function __construct($wpdb){
         $this->wpdb = $wpdb;
      }
      
      /***********************************************************
       *
       ***********************************************************/
      public function setTablesIfNeeded($pFile){
      
         $sql = explode(";", file_get_contents($pFile));
         
         foreach ($sql as $command)
            $this->wpdb->query($command);
      }
   }
}
